cityofheroesfandomcom-20200222-history
Attack Mechanics
Overview The master hit chance formula is: HitChance = Clamp( AccMods × Clamp( BaseHitChance + ToHitMods – DefMods ) ) where * BaseHitChance is the chance of hitting the attack would have if there were no modifiers at all – no Enhancements, no buffs, no level differences, nothing * ToHitMods is the sum of all ToHit buffs and debuffs (the debuffs will be negative) * DefMods is the sum of all relevant Defense buffs and debuffs (ditto) * AccMods is the product of all Accuracy multipliers, and * Clamp(x'') limits ''x to the range of 5% to 95% ToHitMods and DefMods are additive, so they start at 0. AccMods is multiplicative, so it starts at 1. BaseHitChance If a player attacks a critter, BaseHitChance depends on the player's Combat Level and on the critter's level relative to that. The critter's rank and con color don't matter. First, look at the player's Combat Level. If it's 1, BaseHitChance is 90%. If it's 20 or higher, BaseHitChance is 75%. If it's between 1 and 20, scale BaseHitChance proportionately between those two end values. Once that's done, look at the critter's level. If it's lower than the player's, add 5% to BaseHitChance per level of difference. If it's higher-level, subtract roughly 9% per. (An exact table of level adjustments is at the end of this article.) If a player or critter is attacking a player, BaseHitChance is a flat 50%. (Critters will then get Accuracy or ToHit modifiers if they're not the same level as the player. These are covered later. Direct player-vs.-player attacks don't get these adjustments.) Accuracy, ToHit, and Defense ToHit and Defense work the same way as each other, but in opposite directions. What they do is pretty simple: they directly adjust the chance of hitting by the amount of the modifier. (That is, they would be that simple if Accuracy didn't exist, but we'll ignore that for just a moment.) :Example: Let's say you're attacking something with a power that has a 65% chance of hitting. If you got a +20% ToHit buff, your chance of hitting would go up to 85% (65 + 20). If your target then got a +10% Defense buff, your chance would drop to 75% (85 – 10). If you then had your ToHit debuffed by -23%, your hit chance would drop further to 52% (75 – 23). Accuracy is subtly different. It modifies an attack's chance of hitting by a fraction of itself instead of by a fixed amount. :Example: Consider an unbuffed, unenhanced attack that hits 30% of the time. If it got a +50% ToHit buff, its hit chance would rise to 80% (30 + 50). If it got a +50% Accuracy bonus instead, its hit chance would only rise to 45% (30 + (50% of 30), or, alternately, 30 * 1.5). Accuracy is applied in a second step, after all ToHit and Defense modifiers are applied. Accuracy for Players If the attacker is a player, he gets Accuracy multipliers from two places. Multiply them together to get AccMods. First, every power has an inherent Accuracy multiplier built into it. It might be greater than or less than 1.0, depending on whether the power is intended to hit more or less reliably than normal. Often, though, it's exactly 1.0 . Second, a player can get an Accuracy multiplier from Enhancements. Accuracy Enhancements (but not ToHit Buff Enhancements!) in the power itself are the primary source for this kind of Accuracy. Invention Origin Enhancements Sets that give global Accuracy bonuses can also add small amounts to every power. This multiplier starts at 1.0, and Enhancements can only improve it. So for players, AccMods is calculated using: :AccMods = InherentPowerAcc × EnhancementAcc :::= InherentPowerAcc × (1.00 + that power's Accuracy Enhancements + all global Set Accuracy bonuses) Accuracy for Critters If the attacker is a critter, it gets Accuracy multipliers from three places. First, critter powers each have their own inherent Accuracy modifiers, just like player powers do. Second, critters get an Accuracy multiplier based on Rank. Third, if the critter is attacking a player, it will also get an Accuracy (and possibly a ToHit) modifier if it's not the same level. So for critters, we have a slightly longer formula for figuring AccMods: :AccMods = InherentPowerAcc × RankAcc × LevelDifferenceAcc Caps and Floors Final hit chances are forced to stay in the range of 5%–95% to preserve a measure of uncertainty and prevent modifiers from making a power automatically hit or miss. This range limit is also applied once in the middle of the calculation, after adjusting for ToHit and Defense modifiers but prior to applying Accuracy, to prevent situations where strong Defense buffs and/or ToHit debuffs render Accuracy irrelevant no matter how high it was. The Streak Breaker On top of all the calculations above, there is a special feature in the game called the streak breaker. Its purpose is to prevent long streaks of misses, and it works by sometimes forcing a hit regardless of probability depending on how high the upcoming attack's final hit chance is and how many consecutive misses the attacker has had so far. This is a direct quote from Cryptic developer Weirdbeard. Just to be clear, when he says "to-hit" here, he means "chance of hitting": Final to-hit : misses allowed >.9 : 1 .8-.9 : 2 .6-.8 : 3 .4-.6 : 4 .3-.4 : 6 .2-.3 : 8 0 -.2 : 100 Auto-hit powers are not included in the system. Critters get the benefits of the system as well. The system does not track each power individually; instead it tracks every miss you make in a row, regardless of power (or target). Otherwise you could have nine different powers, each with a 0.95 to-hit, and if you executed them all in a row you could miss each attack (note a caveat at the bottom of the post regarding this). AoE attacks are considered distinct sequential attacks on indivudual targets for the purpose of the system (so if you AoE'ed two targets and had 0.95 to-hit for both, you be guaranteed to hit one of them). To determine the to-hit used in the table above, you take either the current to-hit, or the worst to-hit in your current miss series, whichever is lower. Inaccuracies and Errors Since launch, both players and developers have used the term "accuracy" interchangeably to mean all the following things: # actual Accuracy, as described here # ToHit # final hit chance In fact, all powers and Inspirations currently in the game that provide ToHit bonuses or penalties are labeled as "+Acc" or "-Acc" in their descriptions. These are almost all incorrect. Only Accuracy Enhancements and global IO Set bonuses actually give Accuracy. All other powers and effects modify ToHit instead, regardless of game text. On a much less prominent note, some older character builders don't correctly handle inherent power Accuracy multipliers. They add it in with the Accuracy bonus from Enhancements rather than multiplying it as a separate factor. Although this is technically incorrect, the final result is very close to correct. Results, Notes, and Observations * The more Accuracy an attack has, the more every single ToHit and Defense modifier affects its chance of hitting. * A ToHit bonus of X'' gives you a better increase to your chance of hitting than an Accuracy bonus of ''X will. This is especially true against hard-to-hit targets. * Any attack with more Accuracy bonuses than penalties will have a guaranteed chance of hitting greater than the well-publicized 5% minimum. To be exact, it'll be 5% × AccMods. * ToHit and Defense are exact opposites. That is, increasing either produces the exact same change in the overall chance of hitting as decreasing the other by the same amount. Keep in mind, though, that a power that tries to debuff some aspect of an enemy by X'' will only debuff it by part of ''X if that enemy is resistant to that kind of debuff. So, for example, a debuff that gives an enemy -20% ToHit won't always offer the same protection as a buff that gives a teammate +20% Defense, because not all enemies will suffer the full -20. Data Tables Notes: Player-summoned pets (and Malta Auto-Turrets) seem to work like players rather than critters -- that is, their base chance to hit anything is 75% and they get no bonus Accuracy due to their rank. Previously, it was believed that a pet's base chance of hitting things was the same 50% that all critters have and that pets got a rank Accuracy multiplier of 1.5. Although both these arrangements produce the same 75% final hit chance versus equal-level enemies who don't have any Defense bonuses, the way player pets apparently work makes them much better at hitting highly-Defensive or higher-level targets. It is possible this note applies to all summoned pets for both players and critters. See Also * Beginner's Luck References * Arcana's Guide to Defense v1.4 - Updated for I7 * Re: Guide to (Tohit and) Defense v1.10beta Category:Gameplay